package com.struts2.student.service;

import java.util.List;

import com.struts2.student.dao.ClassesDao;
import com.struts2.student.dao.ClassesDaoImpl;
import com.struts2.student.entity.Classes;

public class ClassesServiceImpl implements ClassesService{
	/**
	 * 查询班级信息
	 */
	public List<Classes> findClasses() {
		ClassesDao classesDao = new ClassesDaoImpl();
		return classesDao.findClasses();
		
	}
	/**
	 * 根据id获取班级信息
	 */
	public Classes getClassesById(Integer classId) {
		ClassesDao classesDao = new ClassesDaoImpl();
		return classesDao.get(Classes.class,classId);
	}
	/**s
	 * 保存
	 */
	public void saveClasses(Classes classes) {
		ClassesDao classesDao = new ClassesDaoImpl();
		classesDao.saveOrUpdate(classes);
	}
	/**
	 * 删除
	 */
	public void deleteClasses(Classes classes) {
		ClassesDao classesDao = new ClassesDaoImpl();
		classesDao.delete(classes);
	}


}
